Page({
  data: {
    TabCur: 0,
    scrollLeft:0,
    tabs:[{name:"国漫",id:1},{name:"日漫",id:2}],
    datas:[],
    datar: [[{ img: "https://646f-dongman-a12fz-1302890160.tcb.qcloud.la/riman/%E6%B5%B7%E8%B4%BC%E7%8E%8B_01.jpg?sign=d6429bc235d6986ee857b6b1684b932d&t=1599749550",location:{"left": 312.37,
    "top": 397.53,
    "width": 431,
    "height": 372,
    "rotation": 0}},{ img: "https://646f-dongman-a12fz-1302890160.tcb.qcloud.la/riman/%E6%B5%B7%E8%B4%BC%E7%8E%8B_02.jpg?sign=55d2856cb93dff403cdc8bbe55ab25ff&t=1599749593",location:{"left": 355.63,
    "top": 290.69,
    "width": 359,
    "height": 293,
    "rotation": 1}},{ img: "https://646f-dongman-a12fz-1302890160.tcb.qcloud.la/riman/%E6%B5%B7%E8%B4%BC%E7%8E%8B_%E8%B7%AF%E9%A3%9E.jpg?sign=9f16bb0dfa6a5fa07287dacacb295065&t=1599749762",location:{"left": 278.75,
    "top": 278.46,
    "width": 279,
    "height": 232,
    "rotation": -6}},{ img: "https://646f-dongman-a12fz-1302890160.tcb.qcloud.la/riman/%E6%B5%B7%E8%B4%BC%E7%8E%8B_04.jpg?sign=a793cc24fed5c7d7b313efaff24b9259&t=1599749719",location:{"left": 363.12,
    "top": 153.77,
    "width": 452,
    "height": 435,
    "rotation": 4}}],[{ img: "https://646f-dongman-a12fz-1302890160.tcb.qcloud.la/riman/%E7%81%AB%E5%BD%B1%E5%BF%8D%E8%80%85_01.jpg?sign=2b360cc56c1ca763f9a21096adb26e89&t=1599749836",location:{"left": 312.37,
    "top": 397.53,
    "width": 431,
    "height": 372,
    "rotation": 0}},{ img: "https://646f-dongman-a12fz-1302890160.tcb.qcloud.la/riman/%E7%81%AB%E5%BD%B1%E5%BF%8D%E8%80%85_02.jpg?sign=ac091f390dd3dc65fcd8f47933ff2370&t=1599749885",location:{"left": 303.79,
    "top": 304.75,
    "width": 473,
    "height": 486,
    "rotation": 0}},{ img: "https://646f-dongman-a12fz-1302890160.tcb.qcloud.la/riman/%E8%BE%89%E5%A4%9C%E5%A4%A7%E5%B0%8F%E5%A7%90%E6%83%B3%E8%AE%A9%E6%88%91%E5%91%8A%E7%99%BD_02.jpg?sign=6ed0c6a8768e4c5957a376a50bc692bc&t=1599749923",location:{"left": 278.75,
    "top": 278.46,
    "width": 279,
    "height": 232,
    "rotation": -6}}],],
     datac: [[{ img: "https://646f-dongman-a12fz-1302890160.tcb.qcloud.la/guoman/%E5%94%90%E4%B8%89.JPG?sign=ee7b7998fba2318d42304b39a9377a18&t=1599748092",location:{"left": 16.71,
     "top": 264.75,
     "width": 650,
     "height": 628,
     "rotation": 0} },
      { img: "https://646f-dongman-a12fz-1302890160.tcb.qcloud.la/guoman/%E7%A7%A6%E6%97%B6%E6%98%8E%E6%9C%88_%E9%92%9F%E7%A6%BB%E6%98%A7.png?sign=346e79ee90d5577918c3196e626957dc&t=1599748544",location:{"left": 199.48,
      "top": 373.04,
      "width": 266,
      "height": 245,
      "rotation": -10}},
      { img: "https://646f-dongman-a12fz-1302890160.tcb.qcloud.la/guoman/%E7%A7%A6%E6%97%B6%E6%98%8E%E6%9C%88_%E5%BC%A0%E8%89%AF.png?sign=907859b36a0042aa117b086beff001c1&t=1599748732",location:{"left": 151.26,
      "top": 263.85,
      "width": 301,
      "height": 273,
      "rotation": 0}},
      { img: "https://646f-dongman-a12fz-1302890160.tcb.qcloud.la/guoman/%E7%A7%A6%E6%97%B6%E6%98%8E%E6%9C%88_%E9%9B%AA%E5%A5%B3.png?sign=d6a820675f2ce54f7d74c1c0c4ada7c8&t=1599748756",location:{"left": 155.58,
      "top": 291.77,
      "width": 295,
      "height": 277,
      "rotation": -2}}],[{ img: "https://646f-dongman-a12fz-1302890160.tcb.qcloud.la/guoman/%E7%A7%A6%E6%97%B6%E6%98%8E%E6%9C%88_%E6%99%93%E6%A2%A6.png?sign=a8389f086e2bd0c9cd3a55a0b66590a1&t=1599748966",location:{"left": 76.89,
      "top": 87.02,
      "width": 468,
      "height": 418,
      "rotation": 3} },
       { img: "https://646f-dongman-a12fz-1302890160.tcb.qcloud.la/guoman/%E7%A7%A6%E6%97%B6%E6%98%8E%E6%9C%88_%E9%80%8D%E9%81%A5%E5%AD%90.png?sign=9616c2a6d269d6e7ddcc947f7dcce9ed&t=1599749026",location:{"left": 123.49,
       "top": 180.28,
       "width": 348,
       "height": 348,
       "rotation": 0}},
       { img: "https://646f-dongman-a12fz-1302890160.tcb.qcloud.la/guoman/%E7%A7%A6%E6%97%B6%E6%98%8E%E6%9C%88_%E5%B0%91%E7%BE%BD.png?sign=bf6a9f044bd8aec36af7e4fc0221984e&t=1599749075",location:{"left": 232.51,
       "top": 415.75,
       "width": 611,
       "height": 522,
       "rotation": 3}},
       { img: "https://646f-dongman-a12fz-1302890160.tcb.qcloud.la/guoman/%E7%A7%A6%E6%97%B6%E6%98%8E%E6%9C%88_%E8%8D%86%E5%A4%A9%E6%98%8E.png?sign=7b648db640082b15154628cac396c0a1&t=1599749175",location:{"left": 76.92,
       "top": 190.31,
       "width": 480,
       "height": 452,
       "rotation": 0}}],
       [{ img: "https://646f-dongman-a12fz-1302890160.tcb.qcloud.la/guoman/%E7%A7%A6%E6%97%B6%E6%98%8E%E6%9C%88_%E9%9F%A9%E9%9D%9E.png?sign=db61c421e7079e2b73b818154ab510da&t=1599749341",location:{"left": 95.12,
       "top": 224.3,
       "width": 450,
       "height": 435,
       "rotation": 0} },
        { img: "https://646f-dongman-a12fz-1302890160.tcb.qcloud.la/guoman/%E6%96%97%E7%BD%97%E5%A4%A7%E9%99%86_%E5%B0%8F%E8%88%9E.png?sign=60be377bfe4c254ad0e7991670511066&t=1599749377",location:{"left": 167.73,
				"top": 274.7,
				"width": 319,
				"height": 277,
				"rotation": -2}},
        ],],
  },
  onLoad(){
    var syInfo = wx.getSystemInfoSync();
    this.setData({
      width: syInfo.windowWidth,
      height: syInfo.windowHeight,
      datas:this.data.datac
    })
  },
  bindItemClick: function (e) {
    var index = e.currentTarget.dataset.index
    var idx = e.currentTarget.dataset.idx
    var url = this.data.datas[idx][index].img
    var location = this.data.datas[idx][index].location
    wx.navigateTo({
      url: '../merge/merge?url=' + encodeURIComponent(url) + "&location=" + encodeURIComponent(JSON.stringify(location))
    });
  },
  tabSelect(e) {
    var index=e.currentTarget.dataset.id
    if(index==1){
      this.setData({
        datas:this.data.datar,
        TabCur: index,
        scrollLeft: (e.currentTarget.dataset.id-1)*60
      })
    }else{
      this.setData({
        datas:this.data.datac,
        TabCur: index,
        scrollLeft: (e.currentTarget.dataset.id-1)*60
      })
    }
    
  }
})